package day24;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Scanner;

//通过IO流：模拟Scanner
public class Demo5 {
    public static void main(String[] args) throws IOException {
        //获取系统输入流（只有它能获得控制台数据）
        InputStream is=System.in;
        InputStreamReader isr=new InputStreamReader(is);
        BufferedReader br=new BufferedReader(isr);
        System.out.print("请输入姓名:");
        String name=br.readLine(); //sc.nextLine()  sc.next()
        System.out.print("请输入性别:");
        String sex= br.readLine();
        System.out.println("姓名："+name+",性别："+sex);

        Scanner sc=new Scanner(System.in);
        sc.next();
        sc.nextInt();
    }
}
